package mt.client;

import java.util.LinkedList;

import mt.Order;



public abstract class StockResume {
	
	
	public StockResume(String stock) {
		this.stock = stock;
	}



	public static class BuyOrdersResume extends StockResume {

		public BuyOrdersResume(String stock) {
			super(stock);
		}
		
	}
	
	public static class SellOrdersResume extends StockResume {

		public SellOrdersResume(String stock) {
			super(stock);
		}
		
	}
	

	
	/**
	 * The name of the stock.
	 */
	private String stock;
	
	/**
	 * Total quantity of orders
	 */
	private int quantity;
	
	/**
	 * Medium price per unit
	 */
	private double mediumPrice;
	
	/**
	 * Medium price per unit
	 */
	private double lowestPrice;
	
	/**
	 * Medium price per unit
	 */
	private double highestPrice;
	
	/**
	 * List of orders
	 */
	private LinkedList<Order> ordersList = new LinkedList<Order>(); 
	
	
	



	/**
	 * @return the stock
	 */
	public String getStock() {
		return stock;
	}

	
	/**
	 * @return the quantity
	 */
	public int getQuantity() {
		return quantity;
	}
	/**
	 * @param quantity the quantity to set
	 */
	private void setQuantity(int quantity) {
		this.quantity = quantity;
	}

	
	/**
	 * @return the mediumPrice
	 */
	public double getMediumPrice() {
		return mediumPrice;
	}
	/**
	 * @param mediumPrice the mediumPrice to set
	 */
	private void setMediumPrice(double mediumPrice) {
		this.mediumPrice = mediumPrice;
	}

	
	/**
	 * @return the lowestPrice
	 */
	public double getLowestPrice() {
		return lowestPrice;
	}
	/**
	 * @param lowestPrice the lowestPrice to set
	 */
	private void setLowestPrice(double lowestPrice) {
		this.lowestPrice = lowestPrice;
	}


	/**
	 * @return the highestPrice
	 */
	public double getHighestPrice() {
		return highestPrice;
	}
	/**
	 * @param highestPrice the highestPrice to set
	 */
	private void setHighestPrice(double highestPrice) {
		this.highestPrice = highestPrice;
	}
	

	
	/**
	 * @return the ordersList
	 */
	public LinkedList<Order> getOrdersList() {
		return ordersList;
	}
	/**
	 * Adds a order to the list of orders
	 * @param order
	 */
	public void addOrder(Order order) {
		ordersList.add(order);
	}
	
	
	
}
